<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="materialInfoDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='materialInfoDetail.heading'/>"/>
</head>

<s:form id="materialInfoForm" action="saveMaterialInfo" method="post" validate="true">
    <li style="display: none">
        <s:hidden key="materialInfo.id"/>
    </li>
    <s:textfield key="materialInfo.applyCost" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="materialInfo.applyEndTime" required="true" maxlength="19" cssClass="text medium"/>
    <s:textfield key="materialInfo.applyUrl" required="false" maxlength="256" cssClass="text medium"/>
    <s:textfield key="materialInfo.cv" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="materialInfo.essay" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="materialInfo.gre" required="false" maxlength="16" cssClass="text medium"/>
    <!-- todo: change this to read the identifier field from the other pojo -->
    <s:select name="materialInfo.material.id" list="materialList" listKey="id" listValue="id"></s:select>
    <s:textfield key="materialInfo.ps" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="materialInfo.rl" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="materialInfo.sat" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="materialInfo.sendAddress" required="false" maxlength="512" cssClass="text medium"/>
    <s:textfield key="materialInfo.toefl" required="false" maxlength="16" cssClass="text medium"/>

    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
        <c:if test="${not empty materialInfo.id}">
            <s:submit cssClass="button" method="delete" key="button.delete"
                onclick="return confirmDelete('MaterialInfo')" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
    </li>
</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("materialInfoForm"));
</script>
